package com.mycompany.virtualApp.dao;

import com.mycompany.virtualApp.entity.BannerAdvModel;
import com.mycompany.virtualApp.entity.DesktopAdvModel;
import com.mycompany.virtualApp.mapper.BannerAdvMapper;
import com.mycompany.virtualApp.mapper.DesktopAdvMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2017/12/6 0006.
 */
@Repository("banneradvDao")
public class BannerAdvDaoImpl implements BannerAdvDao {

    @Autowired
    private BannerAdvMapper bannerAdvMapper;



    @Override
    public List<BannerAdvModel> getBannerAdvList(Map<String, Object> map) {
        return bannerAdvMapper.selectAllByParam(map);

    }

    @Override
    public int saveBannerAdv(BannerAdvModel bannerAdvModel) {
        return bannerAdvMapper.saveBannerAdv(bannerAdvModel);
    }

    @Override
    public int updateBanner(BannerAdvModel bannerAdvModel) {
        return bannerAdvMapper.updateBanner(bannerAdvModel);
    }

    @Override
    public int delete(Map<String, Object> map) {
        return bannerAdvMapper.delete(map);
    }
}
